package com.chengzhi.eshopinventory.listener;

import com.chengzhi.eshopinventory.thread.RequestThreadPool;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @description servlet init
 * @author: ruanchengzhi
 * @create: 2021-04-01 15:01
 **/
@Component
@Slf4j
public class SystemInitListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        log.info("[op:systemInitListener] contextInitialized executing");
        RequestThreadPool.init();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
    }
}
